import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useHidStore = defineStore('hid', () => {
  const hidList = ref([])
  
  const setHidList = (list) => {
    hidList.value = list || []
  }
  
  const getHidList = () => {
    return hidList.value
  }
  
  const addHidDevice = (device) => {
    hidList.value.push(device)
  }
  
  const clearHidList = () => {
    hidList.value = []
  }
  
  return {
    hidList,
    setHidList,
    getHidList,
    addHidDevice,
    clearHidList
  }
}) 